package com.roger.homecenterscreen.ui.components

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp

/**
 * 强制全屏包装器
 * 确保内容填满整个E-ink屏幕，消除黑边
 */
@Composable
fun FullScreenWrapper(
    content: @Composable () -> Unit
) {
    val configuration = LocalConfiguration.current
    val density = LocalDensity.current
    
    // 强制使用最大可用空间
    Box(
        modifier = Modifier
            .fillMaxSize()
            .background(Color.White)
            .windowInsetsPadding(WindowInsets(0, 0, 0, 0))
    ) {
        // 强制内容占满整个空间
        Box(
            modifier = Modifier
                .fillMaxSize()
                .offset(x = 0.dp, y = 0.dp)
        ) {
            content()
        }
    }
} 